<!DOCTYPE html>
<html lang="Zh-CN">
    <head>
        <!-- Required meta tags -->
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <title>销售管理系统</title>
        <!-- plugins:css -->
        <link rel="stylesheet" href="/static/vendors/mdi/css/materialdesignicons.min.css">
        <link rel="stylesheet" href="/static/vendors/base/vendor.bundle.base.css">
        <!-- endinject -->
        <!-- plugin css for this page -->
        <link rel="stylesheet" href="/static/vendors/datatables.net-bs4/dataTables.bootstrap4.css">
        <!-- End plugin css for this page -->
        <!-- inject:css -->
        <link rel="stylesheet" href="/static/css/style.css">
        <!-- endinject -->
        <link rel="shortcut icon" href="/static/images/favicon.png" />
    </head>
    <body>
    <div class="container-scroller">
        <nav class="navbar col-lg-12 col-12 p-0 d-flex flex-row fixed-top">
            <div class="navbar-brand-wrapper d-flex justify-content-center">
                  <div class="navbar-brand-inner-wrapper d-flex justify-content-between align-items-center w-100">  
                    <a class="navbar-brand brand-logo" href="{% url 'login:index1' %}"><img src="/static/images/logo.svg" alt="logo"/></a>
                    <a class="navbar-brand brand-logo-mini" href="{% url 'login:index1' %}"><img src="/static/images/logo-mini.svg" alt="logo"/></a>
                    <button class="navbar-toggler navbar-toggler align-self-center" type="button" data-toggle="minimize">
                      <span class="mdi mdi-sort-variant">
                      </span>
                    </button>
                  </div>  
              </div>
            <div class="navbar-menu-wrapper d-flex align-items-center justify-content-end">
              <ul class="navbar-nav navbar-nav-right">
                <li class="nav-item dropdown me-4">
                  <a class="nav-link count-indicator dropdown-toggle d-flex align-items-center justify-content-center notification-dropdown" id="notificationDropdown" href="#" data-bs-toggle="dropdown">
                    <i class="mdi mdi-bell mx-0"></i>
                    <span class="count"></span>
                  </a>
                  <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="notificationDropdown">
                    <p class="mb-0 font-weight-normal float-left dropdown-header">待办通知</p>
                    <a class="dropdown-item">
                      <div class="item-thumbnail">
                        <div class="item-icon bg-success">
                          <i class="mdi mdi-information mx-0"></i>
                        </div>
                      </div>
                      <div class="item-content">
                        <h6 class="font-weight-normal">未处理事务</h6>
                        <p class="font-weight-light small-text mb-0 text-muted">
                          您有未处理的订单
                        </p>
                      </div>
                    </a>
                  </div>
                </li>
                <li class="nav-item nav-profile dropdown">
                  <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" id="profileDropdown">
                    <img src="/static/images/faces/face-czw.jpg" alt="profile">
                    <span class="nav-profile-name">{{login_name}}</span>
                  </a>
                  <div class="dropdown-menu dropdown-menu-right navbar-dropdown" aria-labelledby="profileDropdown">
                    <a class="dropdown-item">
                      <i class="mdi mdi-settings text-primary"></i>
                      账户设置
                    </a>
                    <a class="dropdown-item">
                      <i class="mdi mdi-logout text-primary"></i>
                      下班！
                    </a>
                  </div>
                </li>
              </ul>
              <button class="navbar-toggler navbar-toggler-right d-lg-none align-self-center" type="button" data-toggle="offcanvas">
                <span class="mdi mdi-menu"></span>
              </button>
            </div>
          </nav>
        <div class="container-fluid page-body-wrapper pt-0 proBanner-padding-top">
            <nav class="sidebar sidebar-offcanvas active" id="sidebar">
                <ul class="nav">
                  <li class="nav-item">
                    <a class="nav-link" href="{% url 'sales:sale_index' %}">
                      <i class="mdi mdi-home menu-icon"></i>
                      <span class="menu-title">销售数据中台</span>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a class="nav-link" href="{% url 'sales:sale_order' %}">
                      <i class="mdi mdi-circle-outline menu-icon"></i>
                      <span class="menu-title">开始处理订单</span>
                    </a>
                  </li>
                  <li class="nav-item"><!--以下两项可以考虑后台推送数据表内容，进行数据库更新-->
                    <a type="button" class="nav-link" data-toggle="popover" title="点击发送发货清单"
                       onclick="alertTips('发货清单已发送。')" href="{% url 'sales:delivery' %}">
                      <i class="mdi mdi-circle-outline menu-icon"></i>
                      <span class="menu-title">发送发货清单</span>
                    </a>
                  </li>
                  <li class="nav-item">
                    <a type="button" class="nav-link" data-toggle="popover" title="点击发送销售凭证"
                       onclick="alertTips('销售凭证已发送。')" href="{% url 'sales:income' %}">
                      <i class="mdi mdi-circle-outline menu-icon"></i>
                      <span class="menu-title">发送销售凭证</span>
                    </a>
                  </li>
                </ul>
            </nav>
            <div class="main-panel">
                <div class="content-wrapper">
                    <div class="row grid-margin"> <!--销售推移折线图-->
                        <div class="col-md-12 stretch-card">
                            <div class="card">
                                <div class="card-body">
                                    <p class="card-title">销售对比</p>
                                    </form>
                                    <div class="chartjs-size-monitor">
                                      <div class="chartjs-size-monitor-expand">
                                        <div class></div>
                                      </div>
                                      <div class="chartjs-size-monitor-shrink">
                                        <div class></div>
                                      </div>
                                    </div>
                                    <div style="float:left;width:1600px;height:800px">
                                      <iframe frameborder="0" src="{% url 'sales:movement' %}"
                                              width="100%" height="100%"></iframe>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--未处理订单面板卡片-->
                    <div class="row">
                      <div class="col-md-12 stretch-card">
                        <div class="card">
                          <div class="card-body">
                            <p class="card-title">待处理订单一览</p>
                            <div class="table-responsive">
                              <div id="orders-to-be-checked_wrapper" 
                              class="dataTables_wrapper container-fluid dt-bootstrap4 no-footer">
                              <div class="row">
                                <div class="col-sm-12">
                                  <table id="orders-to-be-checked" 
                                  class="table dataTable no-footer" role="grid">
                                  <thead>
                                    <tr>
                                      <th>订单号</th>
                                      <th>订单收货地</th>
                                      <th>订单总额</th>
                                      <th>订单确认状态</th>
                                    </tr>
                                  </thead>
                                  <tbody>
                                  {% for ord in order %}
                                    <tr>
                                      <td>{{ord.order_id}}</td>
                                      <td>{{ord.address}}</td>
                                      <td>{{ord.sum_price}}</td>
                                      <td>{{ord.process_status}}</td>
                                    </tr>
                                  {% endfor %}
                                  </tbody>
                                  </table>
                                </div>
                              </div>
                            </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                </div>
                <footer class="footer">
                  <div class="d-sm-flex justify-content-center justify-content-sm-between">
                    <span class="text-muted text-center text-sm-left d-block d-sm-inline-block">
                      Copyright © 
                      <a href="https://www.bootstrapdash.com/" target="_blank">bootstrapdash.com </a>
                      2021
                    </span>
                    <span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">
                      Only the best <a href="https://www.bootstrapdash.com/" target="_blank"> Bootstrap dashboard  </a> 
                      templates
                    </span>
                  </div>
                </footer>
            </div>
        </div>
    </div>
    <!-- plugins:js -->
    <script src="/static/vendors/base/vendor.bundle.base.js"></script>
    <!-- endinject -->
    <!-- Plugin js for this page-->
    <script src="/static/vendors/chart.js/Chart.min.js"></script>
    <script src="/static/vendors/datatables.net/jquery.dataTables.js"></script>
    <script src="/static/vendors/datatables.net-bs4/dataTables.bootstrap4.js"></script>
    <!-- End plugin js for this page-->
    <!-- inject:js -->
    <script src="/static/js/off-canvas.js"></script>
    <script src="/static/js/hoverable-collapse.js"></script>
    <script src="/static/js/template.js"></script>
    <!-- endinject -->
    <!-- Custom js for this page-->
    <script src="/static/js/dashboard.js"></script>
    <script src="/static/js/data-table.js"></script>
    <script src="/static/js/jquery.dataTables.js"></script>
    <script src="/static/js/dataTables.bootstrap4.js"></script>
    <!-- End custom js for this page-->

    <script src="/static/js/jquery.cookie.js" type="text/javascript"></script>
    <script>
        function alertTips(msg){
            alert(msg);
        }
    </script>
  </body>
</html>